<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动布局</title>
    <style>
        body {
            margin: 0;
        }
        
        .one,
        .two,
        .three {
            width: 300px;
            height: 100px;
            float: left;
        }
        
        .one {
            background-color: teal;
        }
        
        .two {
            background-color: pink;
        }
        
        .three {
            background-color: lightcoral;
        }
        /*.main {
            overflow: hidden;
        }*/
        
        .main::after {
            display: block;
            content: '';
            clear: both;
        }
    </style>
</head>

<body>
    <div class="main">
        <div class="one"></div>
        <div class="two"></div>
        <div class="three"></div>
    </div>
    <div>hello</div>
</body>

</html>